import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)


const course = {
    state: {
        currentTopic: "",
    },
    mutations: {
        setCurrentTopic(state, currentTopic) {
            state.currentTopic = currentTopic
        },
    },
    actions: {
        asyncSetCurrentTopic(store, currentTopic) {
            store.commit('setCurrentTopic', currentTopic)
        },
    },
    getters: {
        getCurrentTopic(state) {
            return state.currentTopic
        },
    }
}
export default course;
